import VueRouter from 'vue-router'
import HomeContainer from './tabbar/HomeContainer.vue'
import ShopcarContainer from './tabbar/ShopcarContainer.vue'
import MemberContainer from './tabbar/MemberContainer.vue'
import SearchContainer from './tabbar/SearchContainer.vue'
import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from './components/photo/PhotoList.vue'
import PhotoInfo from './components/photo/PhotoInfo.vue'
import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/GoodsInfo.vue'





// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    // account  goodslist
    {
      path:"/",redirect:'home'
    },
    {
      path: '/home',
      component: HomeContainer,
    },
    { path: '/shopcar', component: ShopcarContainer },
    { path: '/member', component: MemberContainer },
    { path: '/search', component: SearchContainer },
    { path: '/home/newsList',component: NewsList},
    { path: '/home/newsinfo/:id',component: NewsInfo},
    { path: '/home/photolist',component: PhotoList},
    { path: '/home/photoinfo/:id',component: PhotoInfo},
    { path: '/home/goodslist',component: GoodsList},
    { path: '/home/goodsinfo/:id',component: GoodsInfo},

  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router